package com.qiusuo0226.platform.pojo.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.qiusuo0226.mysql.pojo.CommonEntity;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;

/**
 * 文件仓库 数据源对象
 * - @Data lombok getter、setter、toString、hash注解
 * - @AllArgsConstructor lombok 全参构造 注解
 * - @NoArgsConstructor lombok 无参构造 注解
 * - @TableName mybaitsPlus 表名 注解
 * - @Table actable 表名 注解
 * - @TableCharset actable 表编码 注解
 * - @TableEngine actable 引擎 注解
 * @author qiusuo
 * @date 2023/3/22 15:33
 */
@ToString
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "sys_file_store")
//@Table(name = Tables.SYS_FILE_STORE, comment = "文件仓库表")
//@TableCharset(MySqlCharsetConstant.UTF8MB4)
//@TableEngine(MySqlEngineConstant.InnoDB)
public class FileStorePO extends CommonEntity implements Serializable {

    private static final long serialVersionUID = -5863690762088520987L;

    @TableField(value = "suffix")
//    @Column(name = "suffix", type = MySqlTypeConstant.VARCHAR, length = 50, comment = "文件后缀", isNull = false, defaultValue = "")
    private String suffix;

    @TableField(value = "size")
//    @Column(name = "size", type = MySqlTypeConstant.BIGINT, length = 20, comment = "文件大小，单位B字节", isNull = false, defaultValue = "0")
    private Long size;

    @TableField(value = "name")
//    @Column(name = "name", type = MySqlTypeConstant.VARCHAR, length = 200, comment = "文件名", isNull = false, defaultValue = "")
    private String name;

    @TableField(value = "data")
//    @Column(name = "data", type = MySqlTypeConstant.BLOB, comment = "文件二进制数据")
    private byte[] data;
}
